package com.google.code.p.restrpc;

import com.google.code.p.restrpc.client.cluster.FailureRecovery;
import com.google.code.p.restrpc.client.loadbalance.LoadBalance;

/**
 * @author dz
 */
public interface RpcOptions {
    
    public static final String RESTRPC_TRANSFER_FORMAT = "restrpc.transfer.format";
    public static final String RESTRPC_LOADBALANCE_STRATEGY= "restrpc.loadbalance.strategy";
    public static final String RESTRPC_FAILURERECOVERY_STRATEGY= "restrpc.failurerecovery.strategy"; 
    public static final String RESTRPC_CLIENT_RETRIES= "restrpc.client.retries";
    public static final String RESTRPC_CLIENT_HEARTBEAT= "restrpc.client.heartbeat";
    public static final String RESTRPC_DIRECTORY_SERVICE_URL = "restrpc.directory.service.url";
     
    /**
     * 
     */
    public static final int DEFAULT_NUMBER_OF_RETRIES = 3;
    
    /**
     * 
     */
    public static final int DEFAULT_WAITING_TIMEOUT = 10000;
    
    /**
     * @return the default value is json
     */
    public TransferFormat getTransferFormat();
    
    /**
     * @return
     */
    public UrlParser getUrlParser();
    
    /**
     * @return the default value is 0
     */
    public int getNumberOfRetries();
    
    /**
     * @return
     */
    public String getDirectoryServiceUrl();
    
    /**
     * @return the heartbeat value,the default value is 60*1000 ms,if <=0,the
     *         heartbeat feature is disabled.
     */
    public int getHeartbeat();
    
    /**
     * @return the default value is failover
     */
    public FailureRecovery getFailureRecovery();
    
    /**
     * @return the default value is weightedroundrobin
     */
    public LoadBalance getLoadBalance();
    
}
